<template>
  <div id="app">

    <mt-header fixed :title="headerTitle" style="fontSize:18px;">
        <mt-button icon="back" slot="left" @click="$router.go(-1)" v-if="titles != '猪兜电影'"></mt-button>
    </mt-header>

    <!-- 路由渲染视窗 -->
    <router-view/>

  </div>
</template>

<script>
 export default {
   data(){
     return {
       titles:''
     }
   },
   computed: {
     headerTitle(){      // 数据依赖更新时，计算属性重新触发更新
       return this.$store.state.headerTitle , this.titles = this.$store.state.headerTitle;; 
     }
   }
 }
</script>

<style lang="scss">
#app {
  padding-top: 52px;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#nav {
  padding: 26px;
  a {
    font-weight: bold;
    color: #2c3e50;
    &.router-link-active {
      color: #42b983;
    }
  }
  div {
    display: inline-block;
  }
}
.mint-header.is-fixed {
  background: #e54847;
  height: 52px;
  z-index: 100 !important;
}
</style>
